from PyQt5.QtWidgets import QPushButton,QApplication,QWidget
from PyQt5.QtWidgets import QMessageBox
import sys

app=QApplication([])
widget=QWidget()

def shoowMSG():
    QMessageBox.information(widget,'info','OK')

btn=QPushButton('click',widget)
btn.clicked.connect(shoowMSG)
widget.show()
sys.exit(app.exec_())